<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:py="http://genshi.edgewall.org/"
	xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
	py:replace="''" />
</head>

<py:def function="portlet_action()">
	${portlet_action_invoices(has_id=True)}
</py:def>

<body id="document" class="tab-grey ">
<div id="view">

<div class="invoice_info">
		<table class="summary">
		<tbody>
			<tr>
				<th>Number:</th>
				<td>${invoice['number']}</td>
			</tr>
			<tr>
				<th>Date:</th>
				<td>${this.date_i18n(invoice.created)}</td>
			</tr>
		</tbody>
	</table>
</div>
${this_logo()}
<h2>${this.mapper_general['variant']}: ${this.mapper_general[var]}</h2>
${this_biller()}
<py:if test="customer">${this_customer()}</py:if>

<div py:if="products" id="view">
	${table_products('show', has_form=False)}
	<div class="summary_invoice">
	<table class="summary">
	<tbody>
		<tr>
			<th>Total</th>
			<td>${invoice['tot']} ${currency}</td>
		</tr>
		<tr py:for="vat in summary['vat']">
			<th>Total (VAT ${vat}%)</th>
			<td>${summary['vat'][vat]} ${currency}</td>
		</tr>
		<tr>
			<th>Total (Gross)</th>
			<td>${summary['gross']} ${currency}</td>
		</tr>
	</tbody>
	</table>
	</div>
</div>
	<py:if test="var == 'proforma'">
	<form  method="get" name="proforma_save_form"
		id="proforma_save_form" action="${tg.url('show')}"><input
		id="actions.save" name="actions.save" value="Move to Invoice" class="button"
		type="submit" />
		<input type="hidden" name="id" value="${invoice.invoice_id}" />
		<input type="hidden" name="var" value="${var}" />
	</form>
	</py:if>
</div>
</body>
</html>
